package banklogicimpl;

import exceptions.NotEnoughMoneyException;

public class SimplestAccount extends AbstractAccount{
    public SimplestAccount(){}
    @Override
    public void withdraw(int x) throws NotEnoughMoneyException{
        if ((this.currentMoney - x)>=0)  {
                this.currentMoney -= x;
        } else throw new NotEnoughMoneyException();
    }
}

